<?php 
include "method/win.php";

if(!isset($_SESSION['user'])){
    show_msg("请先登录!","login.php");
}
if(isset($_GET['action'])){
    logout();
}
if(isset($_GET['page'])){
    $page = $_GET['page'];
}else{
    $page = 1;
}
if(isset($_GET['currpage'])){
    $currpage = $_GET['currpage'];
}else{
    $currpage = 1;
}

$defsql="select * from weibo_user where user_name='".$_SESSION['user']."'";
$defres=$conn->query($defsql);
$defrow=$defres->fetch_assoc();
$str='<a href="person.php?id='.$defrow['user_id'].'">';

$wbsql="select * from weibo_list where author='".$_SESSION['user']."'";
$wbres=$conn->query($wbsql);

$cmsql="select * from weibo_comment where cm_author='".$_SESSION['user']."'";
$cmres=$conn->query($cmsql);

$getsql="select * from weibo_list where author='".$_SESSION['user']."'";
$getres=$conn->query($getsql);
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>我的消息</title>
    <link rel="stylesheet" href="../lib/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" href="css/base.css">
    <link rel="stylesheet" href="css/inbox.css">
    <script src="../lib/jquery/jquery.js" type="text/javascript"></script>
    <script src="../lib/bootstrap/js/bootstrap.js" type="text/javascript"></script>
</head>
<body style=background-image:url("../img/inbox-bg.jpg")>
<!--顶部导航条-->
<nav class="navbar navbar-default">
    <div class="container-fluid">
        <!--头部logo-->
        <div class="navbar-header">
            <a class="navbar-brand" href="#"><em><img src="../img/logo.jpg" height=30 width=30></em><em>小狗微博</em></a>
        </div>

        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <!--搜索框-->
            <form class="navbar-form navbar-left" role="search" method="post" action="search_loginafter.php">
                <div class="form-group">
                    <input type="text" class="form-control" style="width: 400px" placeholder="Search" name="str-search">
                </div>
                <button type="sumbit" class="btn btn-default" name="search-btn">搜索</button>
            </form>
            <ul class="nav navbar-nav navbar-right">
                <li><a href="index_loginafter.php">首页</a></li>
                <li><a href="person_loginafter.php"><?php echo $_SESSION['user']?></a></li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">我的消息 <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                        <li><a href="inbox.php?page=1">@我</a></li>
                        <li><a href="inbox.php?page=2">评论</a></li>
                        <li><a href="inbox.php?page=3">回复</a></li>
                        <li><a href="inbox.php?page=4">赞</a></li>
                    </ul>
                </li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">个人中心 <span class="caret"></span></a>
                    <ul class="dropdown-menu">
                    	<li><a href="fixpw.php">修改密码</a></li>
                        <li><a href="fixtx.php">修改头像</a></li>
                        <li><a href="index_loginafter.php?action=logout">退出登录</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
</nav>

<!--版心-->
<div class="inbox-warp clearfix">
    <!--左边导航栏-->
    <div class="nav-left">
        <ul class="list-group">
            <li class="list-group-item x-p">我的信息箱</li>
            <a href="inbox?page=1"><li class="list-group-item choose-5" id="nav-1">@我的</li></a>
            <a href="inbox?page=2"><li class="list-group-item" id="nav-2">评论</li></a>
            <a href="inbox?page=3"><li class="list-group-item" id="nav-3">回复</li></a>
            <a href="inbox?page=4"><li class="list-group-item" id="nav-4">赞</li></a>
        </ul>
    </div>

    <!--左边版心-->
    <div class="left-warp">
        <!--艾特板块-->
        <div class="at-warp choose-2">
            <!--顶条-->
            <div class="toptab">
                <a href="inbox.php?page=1&currpage=1" class="choose-6" id='at-1'>@我的微博</a>
                <a href="inbox.php?page=1&currpage=2" id='at-2'>@我的评论</a>
                <a href="inbox.php?page=1&currpage=3" id='at-3'>@我的回复</a>
            </div>
            <!--左边列表-->
            <div class="left-list choose-2">
            <?php 
            $atwbsql="SELECT weibo_user.*, weibo_list.* FROM weibo_user, weibo_list WHERE weibo_user.user_name=weibo_list.author AND weibo_list.weibo_content LIKE '%".$str."%' order by weibo_list.public_time desc";
            $atwbres = $conn->query($atwbsql);
            if($atwbres->num_rows){
                while($atwbrows=$atwbres->fetch_assoc()){
                    echo "<div class='box-warp clearfix'>";
//                     头像
                    echo "<div class='user-tx'>";
                    echo "<img src='../".$atwbrows['user_tx']."' style='height: 50px; width: 50px; border-radius: 50%'></div>";
//                     对齐版心
                    echo "<div class='content-warp'>";
//                     用户名
                    echo "<div class='user-name'>".$atwbrows['author']."</div>";
                    echo "<div class='btn-group'>";
                    echo "<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>
                                更多 <span class='caret'></span></button>";
                    echo "<ul class='dropdown-menu'>";
                    if($atwbrows['author']==$_SESSION['user']){
                        echo "<li><a href='javascript:' onclick=delWb(".$atwbrows['weibo_id'].")>删除</a></li>";
                    }else{
                        echo "<li><a href='javascript:' onclick=comWb(".$atwbrows['weibo_id'].")>投诉</a></li>";
                    }
                    echo "</ul></div>";
                    echo "<div class='time'>".$atwbrows['public_time']."</div>";
//                     父源内容
                    echo "<a href='detail_loginafter.php?id=".$atwbrows['weibo_id']."'><div class='parent-content'>
                           ".$atwbrows['author']."：".$atwbrows['weibo_content']."
                        </div></a></div></div>";
                }
            }else{
                echo "<div class='box-warp'>还没人@你，要加油哦！</div>";
            }
            ?>
            </div>

            <!--中间列表-->
            <div class="middle-list">
            <?php 
            $atcmsql="SELECT weibo_user.*, weibo_comment.* FROM weibo_user, weibo_comment where weibo_user.user_name=weibo_comment.cm_author and weibo_comment.cm_content LIKE '%".$str."%' order by weibo_comment.cm_time desc";
            $atcmres = $conn->query($atcmsql);
            if($atcmres->num_rows){
                while($atcmrows=$atcmres->fetch_assoc()){
                    $psql="select * from weibo_list where weibo_id='".$atcmrows['weibo_id']."'";
                    $pres=$conn->query($psql);
                    $prow=$pres->fetch_assoc();
                    
                    echo "<div class='box-warp clearfix'>";
                    //                     头像
                    echo "<div class='user-tx'>";
                    echo "<img src='../".$atcmrows['user_tx']."' style='height: 50px; width: 50px; border-radius: 50%'></div>";
                    //                     对齐版心
                    echo "<div class='content-warp'>";
                    //                     用户名
                    echo "<div class='user-name'>".$atcmrows['cm_author']."</div>";
                    echo "<div class='btn-group'>";
                    echo "<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>
                                更多 <span class='caret'></span></button>";
                    echo "<ul class='dropdown-menu'>";
                    if ($prow['author']==$_SESSION['user']){
                        if($atcmrows['cm_author']==$_SESSION['user']){
                            echo "<li><a href='javascript:' onclick=delCm(".$atcmrows['cm_id'].")>删除</a></li>";
                        }else{
                            echo "<li><a href='javascript:' onclick=comCm(".$atcmrows['cm_id'].")>投诉</a></li>";
                            echo "<li><a href='javascript:' onclick=delCm(".$atcmrows['cm_id'].")>删除</a></li>";
                        }
                    }else if($atcmrows['cm_author']==$_SESSION['user']){
                        echo "<li><a href='javascript:' onclick=delCm(".$atcmrows['cm_id'].")>删除</a></li>";
                    }else{
                        echo "<li><a href='javascript:' onclick=comCm(".$atcmrows['cm_id'].")>投诉</a></li>";
                    }
                    echo "</ul></div>";
                    echo "<div class='time'>".$atcmrows['cm_time']."</div>";
                    echo "<div class='user-txt'>".$atcmrows['cm_content']."</div>";
                    //                     父源内容
                    if($prow['author']){
                        echo "<a href='detail_loginafter.php?id=".$atcmrows['weibo_id']."'><div class='parent-content'>
                               评论".$prow['author']."的微博：".$prow['weibo_content']."
                            </div></a>";
                    }else{
                        echo "<a><div class='parent-content'>该内容涉嫌违规，已被删除</div></a>";
                    }
                    echo "</div></div>";
                }
            }else{
                echo "<div class='box-warp'>还没人@你，要加油哦！</div>";
            }
            ?>
            </div>
            
            <div class="right-list">
            <?php 
            $atkcmsql="SELECT weibo_user.*, weibo_kidcomment.* FROM weibo_user, weibo_kidcomment where weibo_user.user_name=weibo_kidcomment.kidcm_author and weibo_kidcomment.kidcm_content LIKE '%".$str."%' order by weibo_kidcomment.kidcm_time desc";
            $atkcmres = $conn->query($atkcmsql);
            if($atkcmres->num_rows){
                while($atkcmrows=$atkcmres->fetch_assoc()){
                    $psql="select * from weibo_comment where cm_id='".$atkcmrows['cm_id']."'";
                    $pres=$conn->query($psql);
                    $prow=$pres->fetch_assoc();
                    
                    echo "<div class='box-warp clearfix'>";
                    //                     头像
                    echo "<div class='user-tx'>";
                    echo "<img src='../".$atkcmrows['user_tx']."' style='height: 50px; width: 50px; border-radius: 50%'></div>";
                    //                     对齐版心
                    echo "<div class='content-warp'>";
                    //                     用户名
                    echo "<div class='user-name'>".$atkcmrows['kidcm_author']."</div>";
                    echo "<div class='btn-group'>";
                    echo "<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>
                                更多 <span class='caret'></span></button>";
                    echo "<ul class='dropdown-menu'>";
                    if ($prow['cm_author']==$_SESSION['user']){
                        if($atkcmrows['kidcm_author']==$_SESSION['user']){
                            echo "<li><a href='javascript:' onclick=delKidCm(".$atkcmrows['kidcm_id'].")>删除</a></li>";
                        }else{
                            echo "<li><a href='javascript:' onclick=comKidCm(".$atkcmrows['kidcm_id'].">投诉</a></li>";
                            echo "<li><a href='javascript:' onclick=delKidCm(".$atkcmrows['kidcm_id'].">删除</a></li>";
                        }
                    }else if($atkcmrows['kidcm_author']==$_SESSION['user']){
                        echo "<li><a href='javascript:' onclick=delKidCm(".$atkcmrows['kidcm_id'].")>删除</a></li>";
                    }else{
                        echo "<li><a href='javascript:' onclick=comKidCm(".$atkcmrows['kidcm_id'].">投诉</a></li>";
                    }
                    echo "</ul></div>";
                    echo "<div class='time'>".$atkcmrows['kidcm_time']."</div>";
                    echo "<div class='user-txt'>".$atkcmrows['kidcm_content']."</div>";
                    //                     父源内容
                    if($prow['cm_author']){
                        echo "<a href='kid_comment.php?id=".$atkcmrows['cm_id']."'><div class='parent-content'>
                           回复".$prow['cm_author']."的评论：".$prow['cm_content']."
                        </div></a>";
                    }else {
                        echo "<a><div class='parent-content'>该内容涉嫌违规，已被删除</div></a>";
                    }
                    echo "</div></div>";
                }
            }else{
                echo "<div class='box-warp'>还没人@你，要加油哦！</div>";
            }
            ?>
            </div>
        </div>

        <!--评论板块-->
        <div class="cm-warp">
            <!--顶条-->
            <div class="toptab">
                <a href="inbox.php?page=2&currpage=1" class="choose-6" id='cm-1'>评论我的</a>
                <a href="inbox.php?page=2&currpage=2" id='cm-2'>我发出的评论</a>
            </div>
            <!--左边列表-->
            <div class="left-list choose-2">
            <?php 
            if($wbres->num_rows){
                $firstwbrow=$wbres->fetch_assoc();
                $wbstr = " weibo_comment.weibo_id=".$firstwbrow['weibo_id'];
                while($otherwbrows=$wbres->fetch_assoc()){
                    $wbstr = $wbstr." || weibo_comment.weibo_id=".$otherwbrows['weibo_id'];
                }
                $ocmsql="SELECT weibo_user.*, weibo_comment.* FROM weibo_user, weibo_comment where weibo_user.user_name=weibo_comment.cm_author and (".$wbstr.") order by weibo_comment.cm_time desc";
                $ocmres=$conn->query($ocmsql);
                if($ocmres->num_rows){
                    while($ocmrows=$ocmres->fetch_assoc()){
                        $psql="select * from weibo_list where weibo_id='".$ocmrows['weibo_id']."'";
                        $pres=$conn->query($psql);
                        $prow=$pres->fetch_assoc();
                        
                        echo "<div class='box-warp clearfix'>";
                        //                     头像
                        echo "<div class='user-tx'>";
                        echo "<img src='../".$ocmrows['user_tx']."' style='height: 50px; width: 50px; border-radius: 50%'></div>";
                        //                     对齐版心
                        echo "<div class='content-warp'>";
                        //                     用户名
                        echo "<div class='user-name'>".$ocmrows['cm_author']."</div>";
                        echo "<div class='btn-group'>";
                        echo "<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>
                                更多 <span class='caret'></span></button>";
                        echo "<ul class='dropdown-menu'>";
                        if($ocmrows['cm_author']==$_SESSION['user']){
                            echo "<li><a href='javascript:' onclick=delCm(".$ocmrows['cm_id'].")>删除</a></li>";
                        }else{
                            echo "<li><a href='javascript:' onclick=comCm(".$ocmrows['cm_id'].")>投诉</a></li>";
                            echo "<li><a href='javascript:' onclick=delCm(".$ocmrows['cm_id'].")>删除</a></li>";
                        }
                        echo "</ul></div>";
                        echo "<div class='time'>".$ocmrows['cm_time']."</div>";
                        echo "<div class='user-txt'>".$ocmrows['cm_content']."</div>";
                        //                     父源内容
                        if($prow['author']){
                            echo "<a href='index_loginafter.php?id=".$ocmrows['weibo_id']."'><div class='parent-content'>
                           回复".$prow['author']."的评论：".$prow['weibo_content']."
                        </div></a>";
                        }else{
                            echo "<a><div class='parent-content'>该内容涉嫌违规，已被删除</div></a>";
                        }
                        echo "</div></div>";
                    }
                }else {
                    echo "<div class='box-warp'>还没人评论你的微博，要加油哦！</div>";
                }
            }else{
                echo "<div class='box-warp'>你还没有发布微博哦</div>";
            }
            ?>
            </div>

            <!--右边列表-->
            <div class="right-list">
            <?php 
            $mcmsql="SELECT weibo_user.*, weibo_comment.* FROM weibo_user, weibo_comment WHERE weibo_user.user_name=weibo_comment.cm_author and weibo_comment.cm_author='".$_SESSION['user']."' order by weibo_comment.cm_time desc";
            $mcmres = $conn->query($mcmsql);
            if($mcmres->num_rows){
                while($mcmrows=$mcmres->fetch_assoc()){
                    $psql="select * from weibo_list where weibo_id='".$mcmrows['weibo_id']."'";
                    $pres=$conn->query($psql);
                    $prow=$pres->fetch_assoc();
                    
                    echo "<div class='box-warp clearfix'>";
                    //                     头像
                    echo "<div class='user-tx'>";
                    echo "<img src='../".$mcmrows['user_tx']."' style='height: 50px; width: 50px; border-radius: 50%'></div>";
                    //                     对齐版心
                    echo "<div class='content-warp'>";
                    //                     用户名
                    echo "<div class='user-name'>".$mcmrows['cm_author']."</div>";
                    echo "<div class='btn-group'>";
                    echo "<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>
                                更多 <span class='caret'></span></button>";
                    echo "<ul class='dropdown-menu'>";
                    echo "<li><a href='javascript:' onclick=delCm(".$mcmrows['cm_id'].")>删除</a></li>";
                    echo "</ul></div>";
                    echo "<div class='time'>".$mcmrows['cm_time']."</div>";
                    echo "<div class='user-txt'>".$mcmrows['cm_content']."</div>";
                    //                     父源内容
                    if($prow['author']){
                        echo "<a href='detail_loginafter.php?id=".$mcmrows['weibo_id']."'><div class='parent-content'>
                           评论".$prow['author']."的微博：".$prow['weibo_content']."
                        </div></a>";
                    }else{
                        echo "<a><div class='parent-content'>该内容涉嫌违规，已被删除</div></a>";
                    }
                    echo "</div></div>";
                }
            }else{
                echo "<div class='box-warp'>你还没评论别人的微博呢</div>";
            }
            ?> 
            </div>
        </div>
        
        <!--回复板块-->
        <div class="re-warp">
            <!--顶条-->
            <div class="toptab">
                <a href="inbox.php?page=3&currpage=1" class="choose-6" id='re-1'>回复我的</a>
                <a href="inbox.php?page=3&currpage=2" id='re-2'>我发出的回复</a>
            </div>
            <!--左边列表-->
            <div class="left-list choose-2">
            <?php
            if($cmres->num_rows){
                $firstrow = $cmres->fetch_assoc();
                $resstr = "weibo_kidcomment.cm_id = ".$firstrow['cm_id'];
                while ($otherrow = $cmres->fetch_assoc()){
                    $resstr = $resstr." || weibo_kidcomment.cm_id = ".$otherrow['cm_id'];
                }
                $oresql="SELECT weibo_user.*, weibo_kidcomment.* FROM weibo_user, weibo_kidcomment WHERE weibo_user.user_name=weibo_kidcomment.kidcm_author and (".$resstr.") order by weibo_kidcomment.kidcm_time desc";
                $oreres = $conn->query($oresql);
                if($oreres->num_rows){
                    while($orerows=$oreres->fetch_assoc()){
                        $psql="select * from weibo_comment where cm_id='".$orerows['cm_id']."'";
                        $pres=$conn->query($psql);
                        $prow=$pres->fetch_assoc();
                        
                        echo "<div class='box-warp clearfix'>";
                        //                     头像
                        echo "<div class='user-tx'>";
                        echo "<img src='../".$orerows['user_tx']."' style='height: 50px; width: 50px; border-radius: 50%'></div>";
                        //                     对齐版心
                        echo "<div class='content-warp'>";
                        //                     用户名
                        echo "<div class='user-name'>".$orerows['kidcm_author']."</div>";
                        echo "<div class='btn-group'>";
                        echo "<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>
                                更多 <span class='caret'></span></button>";
                        echo "<ul class='dropdown-menu'>";
                        if($orerows['kidcm_author']==$_SESSION['user']){
                            echo "<li><a href='javascript:' onclick=delKidCm(".$orerows['kidcm_id'].")>删除</a></li>";
                        }else{
                            echo "<li><a href='javascript:' onclick=delKidCm(".$orerows['kidcm_id'].">删除</a></li>";
                            echo "<li><a href='javascript:' onclick=comKidCm(".$orerows['kidcm_id'].">投诉</a></li>";
                        }
                        echo "</ul></div>";
                        echo "<div class='time'>".$orerows['kidcm_time']."</div>";
                        echo "<div class='user-txt'>".$orerows['kidcm_content']."</div>";
                        //                     父源内容
                        if($prow['cm_author']){
                            echo "<a href='kid_comment.php?id=".$orerows['cm_id']."'><div class='parent-content'>
                           评论".$prow['cm_author']."的微博：".$prow['cm_content']."
                        </div></a>";
                        }else{
                            echo "<a><div class='parent-content'>该内容涉嫌违规，已被删除</div></a>";
                        }
                        echo "</div></div>";
                    }
                }else{
                    echo "<div class='box-warp'>还没有人回复你的评论，要加油哦</div>";
                }
            }else{
                echo "<div class='box-warp'>你还没有发布评论哦</div>";
            }
            
            ?>
            </div>

            <!--右边列表-->
            <div class="right-list">
            <?php
            $mresql="SELECT weibo_user.*, weibo_kidcomment.* FROM weibo_user, weibo_kidcomment WHERE weibo_user.user_name=weibo_kidcomment.kidcm_author and weibo_kidcomment.kidcm_author='".$_SESSION['user']."' order by weibo_kidcomment.kidcm_time desc";
            $mreres = $conn->query($mresql);
            if($mreres->num_rows){
                while($mrerows=$mreres->fetch_assoc()){
                    $psql="select * from weibo_comment where cm_id='".$mrerows['cm_id']."'";
                    $pres=$conn->query($psql);
                    $prow=$pres->fetch_assoc();
                    
                    echo "<div class='box-warp clearfix'>";
                    //                     头像
                    echo "<div class='user-tx'>";
                    echo "<img src='../".$mrerows['user_tx']."' style='height: 50px; width: 50px; border-radius: 50%'></div>";
                    //                     对齐版心
                    echo "<div class='content-warp'>";
                    //                     用户名
                    echo "<div class='user-name'>".$mrerows['kidcm_author']."</div>";
                    echo "<div class='btn-group'>";
                    echo "<button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown' aria-haspopup='true' aria-expanded='false'>
                                更多 <span class='caret'></span></button>";
                    echo "<ul class='dropdown-menu'>";
                    echo "<li><a href='javascript:' onclick=delKidCm(".$mrerows['kidcm_id'].">删除</a></li>";
                    echo "</ul></div>";
                    echo "<div class='time'>".$mrerows['kidcm_time']."</div>";
                    echo "<div class='user-txt'>".$mrerows['kidcm_content']."</div>";
                    //                     父源内容
                    if($prow['cm_author']){
                        echo "<a href='kid_comment.php?id=".$mrerows['cm_id']."'><div class='parent-content'>
                           评论".$prow['cm_author']."的微博：".$prow['cm_content']."
                        </div></a>";
                    }else{
                        echo "<a><div class='parent-content'>该内容涉嫌违规，已被删除</div></a>";
                    }
                    echo "</div></div>";
                }
            }else{
                echo "<div class='box-warp'>你还没回复别人的评论呢</div>";
            }
            ?>
            </div>
        </div>

        <!--赞板块-->
        <div class="zan-warp">
            <!--顶条-->
            <div class="toptab">
                <a href="inbox.php?page=4&currpage=1" class="choose-6" id='zan'>赞我的</a>
            </div>
            <!--左边列表-->
            <div class="left-list choose-2">
            <?php
            if($getres->num_rows){
                $firstget = $getres->fetch_assoc();
                $getstr = "weibo_zan.weibo_id = ".$firstget['weibo_id'];
                while ($othergets = $getres->fetch_assoc()){
                    $getstr = $getstr." || weibo_zan.weibo_id = ".$othergets['weibo_id'];
                }
                $zansql="SELECT weibo_user.*, weibo_zan.* FROM weibo_user, weibo_zan WHERE weibo_user.user_name=weibo_zan.user and (".$getstr.") order by weibo_zan.time desc";
                $zanres = $conn->query($zansql);
                if($zanres->num_rows){
                    while($zanrows=$zanres->fetch_assoc()){
                        $psql="select * from weibo_list where weibo_id='".$zanrows['weibo_id']."'";
                        $pres=$conn->query($psql);
                        $prow=$pres->fetch_assoc();
                        
                        echo "<div class='box-warp clearfix'>";
                        //                     头像
                        echo "<div class='user-tx'>";
                        echo "<img src='../".$zanrows['user_tx']."' style='height: 50px; width: 50px; border-radius: 50%'></div>";
                        //                     对齐版心
                        echo "<div class='content-warp'>";
                        //                     用户名
                        echo "<div class='user-name'>".$zanrows['user']."</div>";
                        echo "<div class='time'>".$zanrows['time']."</div>";
                        echo "<div class='user-txt'>赞了你</div>";
                        //                     父源内容
                        if($prow['author']){
                            echo "<a href='detail_loginafter.php?id=".$zanrows['weibo_id']."'><div class='parent-content'>
                           ".$prow['author']."：".$prow['weibo_content']."
                        </div></a>";
                        }else {
                            echo "<a><div class='parent-content'>该内容涉嫌违规，已被删除</div></a>";
                        }
                        echo "</div></div>";
                    }
                }else{
                    echo "<div class='box-warp'>还没有人赞你的微博哦</div>";
                }
            }else {
                echo "<div class='box-warp'>你还没有微博哦</div>";
            }
            
            ?>
            </div>
        </div>
    </div>

    <!--右边版心-->
    <div class="right-warp">
        <!--logo填充-->
        <div class="logo">
            <img src="../img/logo1.jpg" style="width: 200px; height: 200px">
        </div>
    </div>
</div>
</body>

<script>
	function delWb(id){
		var tipDelWb = confirm("你确定要删除此条微博？")
		if(tipDelWb){
			$.ajax({
                type:"post",
        		url:"method/delwb_action.php",
        		data:{id: id},
        		success:function(data){
        				alert(data)
        		}
            });
			location.reload();
		}
	}
	function comWb(id){
		var tipComWb = confirm("你确定要投诉此条微博？")
		if(tipComWb){
			$.ajax({
                type:"post",
        		url:"method/complaintwb_action.php",
        		data:{id: id},
        		success:function(data){
        				alert(data)
        		}
            });
		}
	}
	function delCm(id){
		var tipDelCm = confirm("你确定要删除此条评论？")
		if(tipDelCm){
			$.ajax({
                type:"post",
        		url:"method/delcm_action.php",
        		data:{id: id},
        		success:function(data){
        				alert(data)
        		}
            });
			location.reload();
		}
	}
	function comCm(id){
		var tipComCm = confirm("你确定要投诉此条评论？")
		if(tipComCm){
			$.ajax({
                type:"post",
        		url:"method/complaintcm_action.php",
        		data:{id: id},
        		success:function(data){
        				alert(data)
        		}
            });
		}
	}
	function delKidCm(id){
		var tipDelCm = confirm("你确定要删除此条回复？")
		if(tipDelCm){
			$.ajax({
                type:"post",
        		url:"method/delkidcm_action.php",
        		data:{id: id},
        		success:function(data){
        				alert(data)
        		}
            });
			location.reload();
		}
	}
	function comKidCm(id){
		var tipComKidCm = confirm("你确定要投诉此条微博？")
		if(tipComKidCm){
			$.ajax({
                type:"post",
        		url:"method/complaintkidcm_action.php",
        		data:{id: id},
        		success:function(data){
        				alert(data)
        		}
            });
		}
	}

	if(<?php echo $page?>==1){
		$(".list-group li").removeClass("choose-5")
        $("#nav-1").addClass("choose-5")
        $(".at-warp").removeClass("choose-2")
        $(".cm-warp").removeClass("choose-2")
        $(".re-warp").removeClass("choose-2")
        $(".zan-warp").removeClass("choose-2")
        $(".at-warp").addClass("choose-2")
	}else if(<?php echo $page?>==2){
		$(".list-group li").removeClass("choose-5")
        $("#nav-2").addClass("choose-5")
        $(".at-warp").removeClass("choose-2")
        $(".cm-warp").removeClass("choose-2")
        $(".re-warp").removeClass("choose-2")
        $(".zan-warp").removeClass("choose-2")
        $(".cm-warp").addClass("choose-2")
	}else if(<?php echo $page?>==3){
		$(".list-group li").removeClass("choose-5")
        $("#nav-3").addClass("choose-5")
        $(".at-warp").removeClass("choose-2")
        $(".cm-warp").removeClass("choose-2")
        $(".re-warp").removeClass("choose-2")
        $(".zan-warp").removeClass("choose-2")
        $(".re-warp").addClass("choose-2")
	}else if(<?php echo $page?>==4){
		$(".list-group li").removeClass("choose-5")
        $("#nav-4").addClass("choose-5")
        $(".at-warp").removeClass("choose-2")
        $(".cm-warp").removeClass("choose-2")
        $(".re-warp").removeClass("choose-2")
        $(".zan-warp").removeClass("choose-2")
        $(".zan-warp").addClass("choose-2")
	}

	if(<?php echo $page?>==1 && <?php echo $currpage?>==1){
		$(".toptab a").removeClass("choose-6")
        $("#at-1").addClass("choose-6")
        $(".left-list").removeClass("choose-2");
        $(".right-list").removeClass("choose-2")
        $(".middle-list").removeClass("choose-2")
        $(".at-warp .left-list").addClass("choose-2");
	}else if(<?php echo $page?>==1 && <?php echo $currpage?>==2){
		$(".toptab a").removeClass("choose-6")
        $("#at-2").addClass("choose-6")
        $(".left-list").removeClass("choose-2");
        $(".right-list").removeClass("choose-2")
        $(".middle-list").removeClass("choose-2")
        $(".at-warp .middle-list").addClass("choose-2");
	}else if(<?php echo $page?>==1 && <?php echo $currpage?>==3){
		$(".toptab a").removeClass("choose-6")
        $("#at-3").addClass("choose-6")
        $(".left-list").removeClass("choose-2");
        $(".right-list").removeClass("choose-2")
        $(".middle-list").removeClass("choose-2")
        $(".at-warp .right-list").addClass("choose-2");
	}else if(<?php echo $page?>==2 && <?php echo $currpage?>==1){
		$(".toptab a").removeClass("choose-6")
        $("#cm-1").addClass("choose-6")
        $(".left-list").removeClass("choose-2");
        $(".right-list").removeClass("choose-2")
        $(".middle-list").removeClass("choose-2")
        $(".cm-warp .left-list").addClass("choose-2");
	}else if(<?php echo $page?>==2 && <?php echo $currpage?>==2){
		$(".toptab a").removeClass("choose-6")
        $("#cm-2").addClass("choose-6")
        $(".left-list").removeClass("choose-2");
        $(".right-list").removeClass("choose-2")
        $(".middle-list").removeClass("choose-2")
        $(".cm-warp .right-list").addClass("choose-2");
	}else if(<?php echo $page?>==3 && <?php echo $currpage?>==1){
		$(".toptab a").removeClass("choose-6")
        $("#re-1").addClass("choose-6")
        $(".left-list").removeClass("choose-2");
        $(".right-list").removeClass("choose-2")
        $(".middle-list").removeClass("choose-2")
        $(".re-warp .left-list").addClass("choose-2");
	}else if(<?php echo $page?>==3 && <?php echo $currpage?>==2){
		$(".toptab a").removeClass("choose-6")
        $("#re-2").addClass("choose-6")
        $(".left-list").removeClass("choose-2");
        $(".right-list").removeClass("choose-2")
        $(".middle-list").removeClass("choose-2")
        $(".re-warp .right-list").addClass("choose-2");
	}else if(<?php echo $page?>==4 && <?php echo $currpage?>==2){
		$(".toptab a").removeClass("choose-6")
        $("#zan").addClass("choose-6")
        $(".left-list").removeClass("choose-2");
        $(".right-list").removeClass("choose-2")
        $(".middle-list").removeClass("choose-2")
        $(".zan-warp .left-list").addClass("choose-2");
	}
</script>
</html>